﻿using Microsoft.Xna.Framework.Graphics;
using System.Xml.Serialization;

namespace Tomahawk.Runtime.Rendering.Materials
{
    public class SASMaterial
    {
        #region Material Definition
        /// <summary>
        /// 
        /// </summary>
        public struct MaterialDefinition
        {
            [XmlAttribute("meshpart")]
            public string MeshPartName;

            [XmlAttribute("material")]
            public string MaterialName;

            [XmlElement("Diffuse")]
            public string DiffuseMapName;

            [XmlElement("Normal")]
            public string NormalMapName;

            [XmlElement("Specular")]
            public string SpecularMapName;

            [XmlElement("Environment")]
            public string EnvironmentMapName;

            [XmlElement("Illumination")]
            public string LightMapName;
        };
        #endregion

        #region Properties
        protected Texture diffuseMap = null;
        public Texture DiffuseMap { get { return diffuseMap; } set { diffuseMap = value; } }

        protected Texture normalMap = null;
        public Texture NormalMap { get { return normalMap; } set { normalMap = value; } }

        protected Texture specularMap = null;
        public Texture SpecularMap { get { return specularMap; } set { specularMap = value; } }

        protected Texture environmentMap = null;
        public Texture EnvironmentMap { get { return environmentMap; } set { environmentMap = value; } }

        protected Texture lightMap = null;
        public Texture LightMap { get { return lightMap; } set { lightMap = value; } }

        protected SASEffect effect;
        public SASEffect Effect { get { return effect; } }
        #endregion

        public SASMaterial(SASEffect effect)
        {
            this.effect = effect;
        }
    }
}
